//
//  WebServer.h
//  CLBrowser
//
//  Created by 梁慧聪 on 2021/7/10.
//  Copyright © 2021年 梁慧聪. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <GCDWebServer/GCDWebServer.h>
#import <GCDWebServer/GCDWebServerDataResponse.h>
typedef GCDWebServerResponse *(^CLServerBlock)(GCDWebServerRequest *);

@interface CLWebServer : NSObject

SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(CLWebServer)

- (BOOL)start;
- (NSString *)base;
- (void)registerHandlerForMethod:(NSString *)method module:(NSString *)module resource:(NSString *)resource handler:(CLServerBlock)handler;
- (void)registerMainBundleResource:(NSString *)resource module:(NSString *)module;
@end
